package org.fisco.bcos.sdk.v3.test.wasm.liquid;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.fisco.bcos.sdk.v3.client.Client;
import org.fisco.bcos.sdk.v3.codec.datatypes.Function;
import org.fisco.bcos.sdk.v3.codec.datatypes.Type;
import org.fisco.bcos.sdk.v3.codec.datatypes.TypeReference;
import org.fisco.bcos.sdk.v3.codec.datatypes.Utf8String;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple1;
import org.fisco.bcos.sdk.v3.codec.scale.FunctionEncoder;
import org.fisco.bcos.sdk.v3.contract.Contract;
import org.fisco.bcos.sdk.v3.crypto.CryptoSuite;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.model.CryptoType;
import org.fisco.bcos.sdk.v3.model.TransactionReceipt;
import org.fisco.bcos.sdk.v3.model.callback.TransactionCallback;
import org.fisco.bcos.sdk.v3.transaction.model.exception.ContractException;
import org.fisco.bcos.sdk.v3.utils.StringUtils;

@SuppressWarnings("unchecked")
public class HelloWorld2 extends Contract {
    public static final String[] BINARY_ARRAY = {
        "0061736d0100000001460c60027f7f0060017f0060037f7f7f0060037f7f7f017f60047f7f7f7f006000017f60000060047f7f7f7f017f60057f7f7f7f7f0060017f017f60027f7f017f60027f7f017e02a501090462636f730a73657453746f7261676500040462636f730a67657453746f7261676500030462636f730672657665727400000462636f730463616c6c00070462636f731167657452657475726e4461746153697a6500050462636f730d67657452657475726e4461746100010462636f730666696e69736800000462636f730f67657443616c6c4461746153697a6500050462636f730b67657443616c6c44617461000103323101010002010200020a020002020401040408070b010000020009010500000001000506000600000303000002030102000305030100110609017f01418080c0000b072604066d656d6f7279020009686173685f74797065002a066465706c6f79002b046d61696e002d0ab547313301017f2000100a200041146a2d0000410247044020002802102201280200047f2001100a20002802100520010b410c100b0b0b2601017f024020002802004100200028020422001b2201450d002000450d0020012000100b0b0b850201037f200004402001200141046a22034d4100200341016b20034d1b450440000b41c082c0002802002103200041086b220120012802002204417e71360200024002402004417c71220220006b20024d044020004100360200200041046b280200417c712202450d0120022d00004101710d01200110362002280200210020012d000041027104402002200041027222003602000b200321012000417c71220020026b41086b20004d0d020b000b02402004417c712202450d004100200220044102711b2202450d0020022d00004101710d0020002002280208417c7136020020022001410172360208200321010c010b200020033602000b41c082c00020013602000b0b4801017f024002402002200241016b2202490d0020012802081a20012802101a20012903001a20012802142203200220036a4b0d00200141003602140c010b000b200041003602000b6701037f230041106b22012400200141086a410b4100100e200128020c210320012802082202418080c000290000370000200241076a418780c000280000360000200041146a41023a00002000420b3702082000200336020420002002360200200141106a24000b6601017f230041106b220324000240200141004e0440027f2002450440200341086a2001100f200328020c210220032802080c010b20032001410110102003280204210220032802000b22010d010b000b2000200136020020002002360204200341106a24000b3301017f230041106b22022400200241086a200141001010200020022802083602002000200228020c360204200241106a24000b4a01017f4101210302402001450440410021010c010b20014101101121030240200204402003450d012003200110380c020b20030d010b410021030b20002001360204200020033602000b9c0101027f230041106b2202240002402000200041046a22034d0440200341016b220020034d0d010b000b20004102762100200241c082c00028020036020c0240200020012002410c6a103522030d0020022000200110344100210320022802000d0020022802042203200228020c3602082002200336020c200020012002410c6a103521030b41c082c000200228020c360200200241106a240020030bd00101037f230041106b22032400024002400240200141004e0440200228020022040d0120032001100f20032802042104200328020021020c020b20004101360200200041086a41003602000c020b20022802042205450440200341086a200141001010200328020c2104200328020821020c010b2001410110112202450440410021020c010b200220042005103720042005100b200121040b2000027f200204402000200236020441000c010b200020013602044101210441010b360200200041086a20043602000b200341106a24000ba70101037f230041206b220224000240200120002802042203200028020822046b4b0440200120046a22012004490d01200320036a22042003490d012004200120012004491b22014108200141084b1b2101024020030440200241186a410136020020022003360214200220002802003602100c010b200241003602100b20022001200241106a101220022802004101460d01200020022902043702000b200241206a24000f0b000b3201017f2000200210132000280208220320002802006a2001200210372003200220036a22014b0440000b200020013602080b4601027f230041106b22032400200341086a20024100100e200328020821042000200328020c36020420002004360200200420012002103720002002360208200341106a24000b14002001200346044020002002200110370f0b000bc60101047f024020000d0020000d00024002402000450d002000450d000c010b410021000b0340024041002000047f20000d0141000541000b22006b22020d022002450d02200041c082c0006a22002c00002203417f4a0d02200020026a220421012002410147044020002d00011a200041026a21010b200341ff017141e001490d0220042200200147047f200141016a210020012d00000541000b1a200341ff017141f001490d022000200447044020002d00001a0b0c020b200041016b21000c000b000b000bec0101067f410121074101210403400240024002402004220620056a22042006490d00200220044d0d01200520086a22092008490d00200220094d0d0002400240200120046a2d00002204200120096a2d000022094b2003710d00200420094f200372450d0020042009460d01200641016a22042006490d024101210741002105200621080c050b200541016a22042005490d01200420066a22042006490d01200420086b220720044b0d010c030b2005200541016a22054b0d002006210420052007470d032004200420076a22044d0d020b000b20002007360204200020083602000f0b410021050c000b000b3701017f230041106b22042400200441086a4100200320012002101a200020042802083602002000200428020c360204200441106a24000b36000240200120024d0440200220044d04402002200220016b2204490d02200020043602042000200120036a3602000f0b000b000b000ba00201077f4101210941012104034002400240024002402004220720056a22042007490d00200120044d0d03200741016a22042007490d00200420056a22082004490d00200120086b220820014b0d00200120084d0d00200a41016a2206200a490d002006200520066a22064b0d00200120066b220620014b0d00200120064d0d0002400240200020086a2d00002208200020066a2d000022064b2003710d00200620084d200372450d0020062008460d0141012109410021052007210a0c040b200541016a22042005490d01200420076a22042007490d012004200a6b220920044b0d010c020b2005200541016a22054b0d0020052009470440200721040c030b200720096a220420074f0d010b000b410021050b20022009470d010b0b200a0b2b01017e034020010440200141016b210142012000310000862002842102200041016a21000c010b0b20020bdc0301087f230041406a22012400200141286a2000410c6a2203101e200128022c2204280200220541016b220220054e21050240024020012802282d00042206410247044020050d02200420023602002006450d01200141206a210420032802000440000b2003417f360200200420033602042004200341046a36020020012802242104200128022022022d00044102460440000b20022802002202410020022802001b2202044020002802082106200028020041c482c0004100360200200141306a2002101f41c482c0002802002200200128023822026a22052000490d032005418080014b0d0320012802302108200141186a2000200510202001280218200128021c20082002101641c482c000280200220020026a22022000490d0341c482c0002002360200200141306a100a200141106a41c482c000280200102120062001280210200128021410000b2004280200220041016a22022000480d0220042002360200200141086a210020032802000440000b2003417f360200200020033602042000200341046a360200200128020c2100200128020822032d00044102470440200341003a00040b2000280200220341016a22042003480d02200020043602000c010b20050d01200420023602000b200141406b24000f0b000b2d01017f200128020041016a220241004c0440000b20012002360200200020013602042000200141046a3602000bb70102037f017e230041106b22032400024002402001280208220241046a220420024f044020012802002101200320044100100e2003290300210520004100360208200020053702002002413f4d04402000200241027410320c030b200241ffff004d0440200320024102744101723b010e20002003410e6a410210140c030b200241ffffffff034b0d012002410274410272200010330c020b000b2000410310322002200010330b2000200120021014200341106a24000b3d01017f0240200120024d04402002418080014d04402002200220016b2203490d02200020033602042000200141c882c0006a3602000f0b000b000b000b4b01027f230041106b22022400200241086a21032001418080014b0440000b20032001360204200341c882c000360200200020022802083602002000200228020c360204200241106a24000b260020001023200041106a22002d00044102460440000b20002802002200410020002802001b0b900202057f017e230041306b22012400200141106a2000410c6a2202101e024020012802142203280200220441016b220520044e0d0020012802102d00042003200536020041024604400240024020002802002000280208102410012200450d002000418180014f0d0341c482c0002000360200200141086a2000102520012001290308370318200141206a200141186a102620012802202200450d00200129022421060c010b410021000b20022802000440000b2002417f360200200120023602042001200241046a3602002001280204210220012802002001200637022420012000360220200141206a10272002280200220041016a22032000480d01200220033602000b200141306a24000f0b000b2a01027f230041106b22002400200041086a410041c482c00028020010202000280208200041106a24000b5801027f230041106b22022400200241086a41c482c0002802001021200228020821032001200228020c4b0440000b20022001360204200220033602002000200228020036020020002002280204360204200241106a24000b6202017f017e230041206b22022400200241106a2001102e024020022802100440200241086a200241186a2802002201360200200220022903102203370300200041086a2001360200200020033702000c010b200041003602000b200241206a24000ba00101027f230041106b220324000240024020002d",
        "00044102460440410c410410112202450d02200041003a00042000200236020020022001290200370200200241086a200141086a2802003602000c010b200341086a2202200141086a280200360200200320012902003703002000280200220028020004402000100a0b20002003290300370200200041086a20022802003602000b200341106a24000f0b000b2a01017f230041106b2201240020012000101f2001280200200128020810022001100a200141106a24000b4801027f230041106b22022400200241086a41044100100e200228020821032000200228020c360204200020033602002003200128000036000020004104360208200241106a24000b040041000bbd0402057f017e230041a0016b22002400200041186a100d200041306a4100102c02400240024020002d0030450440200041d0006a2000413c6a29020037030020002000290234370348200041e0006a200041d4006a28020022013602002000200029024c22053703582000200136026c200020053e026820004190016a200041e8006a1026200028029001450d02200041f8006a20004198016a28020022013602002000200029039001220537037020004188016a200136020020002005370380010240200041186a1022450440200041106a2103200041246a220122022802000440000b2002417f360200200320023602042003200241046a36020020002802142102200028021020004198016a200041f8006a280200360200200020002903703703900120004190016a10272002280200220341016a22042003480d0520022004360200200041086a210220012802000440000b2001417f360200200220013602042002200141046a360200200028020c2101200028020822022d00044102470440200241013a00040b2001280200220241016a22032002480d05200120033602000c010b20004180016a100a0b200041186a101d200041d8006a100a0c010b200041c8006a41a982c00041141015200041c8006a1028200041c8006a100a0b200041186a100a2000412c6a2d0000410247044020002802282201280200047f2001100a20002802280520010b410c100b0b200041a0016a24000f0b230041106b220124002001419b82c000410e1015200110282001100a000b000b970201027f230041306b22022400024002401007220341034b0d002001450d0020004181083b01000c010b20022003102f2002280200220310082000027f02402001044020022002280208220136021420022003360210024020014104490d002002410036021c200241106a2002411c6a410410300d00200241206a2002280214102f200241106a2002280220220120022802281030450d02200241206a100a0b200041003a000141010c020b200041003a0000200041046a4100360200200041086a2002290300370200200041106a200241086a2802003602000c020b200228021c21032000410c6a2002290224370200200041086a2001360200200041046a200336020041000b3a00002002100a0b200241306a24000b9e0e02087f017e23004180026b22002400200041c8006a100d200041a8016a4101102c0240024002400240024020002d00a8014101470440200041e8006a200041b8016a28020022013602002000200041b0016a290300220837036020002802ac012102200041f8006a200136020020002008370370027f0240200241c4a58a987e4704400240200241ed9899e703470440200241cea6a3f405470d0120002000280278360284012000200028027036028001200041f0016a20004180016a102e20002802f001450d0320004190016a200041f8016a280200360200200020002903f00137038801200041c8006a1023200041dc006a2d00004102460d09200041013a005c200041d8006a2802002202280200450d09200041f8016a20004190016a28020036020020002000290388013703f001200041cea6a3f4053602a80120004198016a200041a8016a1029200041a8016a200041f0016a101f20002802ac01210620002802a801210120004198016a20002802b00122041013200028029801220520002802a00122036a200120041037200320046a22042003490d09200020043602a001200020063602ec01200020013602e801200041e8016a100a2002280200200241086a28020020052004100345044041c482c0004100360200200041086a410010250b20004198016a100a200041f0016a100a200041c8006a101d41030c040b200041c8006a10222201450d08200041ed9899e7033602a801200041f0016a200041a8016a1029027f41012001280200200128020820002802f00120002802f80110030d001a024010042201418180014f044020004198016a2001102f20002802980122021005200020002802a00136028c012000200236028801200041a8016a20004188016a102e20002902ac01210820002802a801210120004198016a100a0c010b410021022001044010241005200121020b41c482c0002002360200200041106a200210252000200029031037039801200041a8016a20004198016a102e20002902ac01210820002802a80121010b2001450b200041f0016a100a0d082001450d082000200837029c012000200136029801200041a8016a20004198016a101f20002802a80120002802b0011006200041a8016a100a20004198016a100a41030c030b200041f0006a100a200041c8006a1009418b82c0002101411021020c050b200020002802783602ec01200020002802703602e801200041f0016a200041e8016a102e20002802f001450d0020004190016a200041f8016a22022802002203360200200020002903f00122083703880120022003360200200020083703f0012008a72106027f20030440200041406b2006200341001018200028024420002802402102200041386a2006200341011018200028023c200041306a20062003200220002802382205200220054b22051b2202101920051b220520026a22072005490d082000280234210120002802302104200041286a2005200720062003101a027f20002802282107200028022c200146047f2004200720011039450541000b450440200320026b220120034b0d0a2002200120012002491b220141016a22052001490d0a417f210420062003101c210820022101417f0c010b4100210420032006200320054100101b22012006200320054101101b2207200120074b1b6b220120034b0d09200041206a200620032005101920002802202000280224101c210820030b2107200041e4016a2003360200200041dc016a4100360200200041d0016a2007360200200041cc016a2004360200200041c4016a4200370200200041c0016a2005360200200041bc016a2001360200200041b8016a2002360200200041b0016a2008370300200020063602e001200041c082c0003602d801200041013602a8012008422088a7210120030c010b200041e4016a4100360200200041dc016a4100360200200041b4016a4181023b0100200041b0016a4100360200200020063602e001200041c082c0003602d801200042003703a8014101210141000b2102024020030440200041b0016a2101200041cc016a280200417f47044020004198016a20012002100c0c020b20004198016a20012002100c0c010b20002802ac0122020d08200141ff01710440200041a0016a20023602002000200236029c0120004101360298010c010b20004100360298010b2000280298012102200041f0016a100a200041186a41014100100e200041003602b001200020002903183703a801200020023a009801200041a8016a20004198016a4101101420002802a80120002802b0011006200041a8016a100a41030c010b41010b2104200041f0006a100a200041c8006a1009418b82c0002101411021020240200441016b0e03000204030b419b82c0002101410e21020c020b200041c8006a10090b41a982c0002101411421020b200041a8016a200120021015200041a8016a1028200041a8016a100a0b20004180026a24000f0b000b20021017000b8b0902087f037e230041206b22032400200341003a00080240024002400240027e0240024002402001200341086a410110300d00024020032d0008220241037122044103470440024002400240200441016b0e020201000b200241027621020c030b200320023a000d200341013a000c200320013602082003410036021c200341086a2003411c6a410410310d03200328021c220241ffff034d0d03200241027621020c020b200320023a000d200341013a000c20032001360208200341003b011c200341086a2003411c6a410210310d0220032f011c220241ff014d0d02200241027621020c010b200241044f0d01200341003602082001200341086a410410300d012003280208220241ffffffff034d0d010b20012802042002490d00200341086a2002102f200120032802082204200328021010300440200341086a100a0c010b4100200329020c220c422088a7220541076b2201200120054b1b2109200441036a417c7120046b2108410021010340200120054f0d07024002400240200120046a2d00002206411874411875220741004e04402008417f460d03200820016b4103710d030340200120094f0d03200120046a220241046a280200200228020072418081828478710d032001200141086a22014d0d000b0c010b42808080808020210a428080808010210b024002400240024002402006418b80c0006a2d000041026b0e030002010e0b200141016a22022005490d024200210a0c0c0b4200210a200141016a220220054f0d0b200220046a2d000021020240024002400240200641f0016b0e050100000002000b200241bf014b0d0c2007410f6a41ff017141024b0d0c200241187441187541004e0d0c0c020b200241f0006a41ff017141304f0d0b0c010b2002411874411875417f4a0d0a2002418f014b0d0a0b200141026a220220054f0d0b200220046a2d000041c00171418001470d084200210b200141036a220220054f0d0c200220046a2d000041c00171418001460d02428080808080e0000c0a0b4200210a200141016a220220054f0d0a200220046a2d00002102024002400240200641e001470440200641ed01460d012007411f6a41ff0171410c490d02200241bf014b0d0c200741fe017141ee01470d0c200241187441187541004e0d0c0c030b200241e0017141a001470d0b0c020b2002411874411875417f4a0d0a200241a0014f0d0a0c010b2002411874411875417f4a0d09200241bf014b0d090b4200210b200141026a220220054f0d0b200220046a2d000041c00171418001470d070c010b200220046a2d000041c00171418001470d0a0b200241016a21010c030b000b20012005200120054b1b2102034020012002460440200221010c030b200120046a2c00004100480d02200141016a21010c000b000b200141016a21010c000b000b200041003602000c060b428080808080c0000c010b428080808080200b210a428080808010210b0c010b4200210b0b2001ad200a200b8484210a0b200120054f04402000200c370204200020043602000c010b2003200a3702142003200c37020c20032004360208200341086a100a2000410036",
        "02000b200341206a24000b3602017f017e230041106b22022400200241086a20014101100e200229030821032000200136020820002003370200200241106a24000b3901027f2000280204220320024922044504402001200220002802002201200210162000200320026b3602042000200120026a3602000b20040b4201017f20002f01042103200041003a0004200341017145044020002802002001200210300f0b200120034108763a00002000280200200141016a200241016b10300b2601017f230041106b22022400200220013a000f20002002410f6a41011014200241106a24000b2601017f230041106b220224002002200036020c20012002410c6a41041014200241106a24000bd20101017f0240200141ffffffff03712001470d002002200241406b22034b0d00200341ffffffff01712003470d002001410274220120034103742202200120024b1b220241086a22012002490d00027f024020012001418080046a22024d0440200241016b220120024d0d010b000b2001411076220240002201417f4604404100210141010c010b200141ffff03712001470d012002411074220241086b20024b0d012001411074220142003702042001200120026a41027236020041000b210220002001360204200020023602000f0b000baf04010a7f20004102742106410020016b2108200041ffffffff03712000472109200141016b220a20014b210b20022802002100024003402000450d01200021010240034002402001280208220041017145044020090d032001280200417c712203200141086a22056b220420034b0d0320042006490d01200320066b220c20034b0d03200b0d03200541086a22042005490d032004200441406b22044b0d03024020042008200c7122044b04402005200a710d0320022000417c7136020020012001280200410172360200200121000c010b200441086b220020044b0d04200320006b220220034b0d04200241086b20024b0d04200041003602082000420037020020002001280200417c71360200024020012802002202417c712203450d004100200320024102711b2202450d00200220022802044103712000723602040b2000200028020441037120017236020420012001280208417e71360208200120012802002202410371200072220336020002402002410271450440200028020021010c010b20012003417d713602002000200028020041027222013602000b200020014101723602000b200041086a21070c050b20012000417e71360208027f41002001280204417c712200450d001a4100200020002d00004101711b0b21002001103620012d00004102710440200020002802004102723602000b200220003602002000280200417c71220120006b41086b20014b0d02200021010c010b0b200220003602000c010b0b000b20070b7d01027f024020002802002201417c712202450d004100200220014102711b2201450d00200120012802044103712000280204417c71723602040b200020002802042201417c712202047f200220022802004103712000280200417c717236020020002802040520010b410371360204200020002802004103713602000b2801017f034020022003470440200020036a200120036a2d00003a0000200341016a21030c010b0b0b2201017f034020012002470440200020026a41003a0000200241016a21020c010b0b0b3f01027f0340200245044041000f0b200241016b210220012d0000210320002d00002104200041016a2100200141016a210120032004460d000b200420036b0b0b8a020300418080c0000b8b0168656c6c6f5f776f726c6401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010041cd81c0000b3302020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303040404040400418b82c0000b32756e6b6e6f776e2073656c6563746f72696e76616c696420706172616d73636f756c64206e6f74207265616420696e70757400a602046e616d65019e023a000966696d706f72742430010966696d706f72742431020966696d706f72742432030966696d706f72742433040966696d706f72742434050966696d706f72742435060966696d706f72742436070966696d706f72742437080966696d706f727424380901300a01310b01320c01330d01340e01350f0136100137110138120139130231301402313115023132160231331702313518023138190231391a0232301b0232331c0232341d0232351e0232361f023239200233302102333122023332230233332402333425023335260233362702333728023338290233392a0234302b0234312c0234322d0234362e0234372f02343830023439310235303202353233023533340235363502353736023538370235393802363039023631"
    };

    public static final String BINARY = StringUtils.joinAll("", BINARY_ARRAY);

    public static final String[] SM_BINARY_ARRAY = {
        "0061736d0100000001460c60027f7f0060017f0060037f7f7f0060037f7f7f017f60047f7f7f7f006000017f60000060047f7f7f7f017f60057f7f7f7f7f0060017f017f60027f7f017f60027f7f017e02a501090462636f730463616c6c00070462636f731167657452657475726e4461746153697a6500050462636f730d67657452657475726e4461746100010462636f730666696e69736800000462636f730a73657453746f7261676500040462636f730a67657453746f7261676500030462636f730672657665727400000462636f730f67657443616c6c4461746153697a6500050462636f730b67657443616c6c44617461000103323101010002010200020a020002020401040408070b050600000900010106000100000000050002000303000002030102000305030100110609017f01418080c0000b072604066d656d6f7279020009686173685f74797065001d066465706c6f79001e046d61696e00250ab747313301017f2000100a200041146a2d0000410247044020002802102201280200047f2001100a20002802100520010b410c100b0b0b2601017f024020002802004100200028020422001b2201450d002000450d0020012000100b0b0b850201037f200004402001200141046a22034d4100200341016b20034d1b450440000b41c082c0002802002103200041086b220120012802002204417e71360200024002402004417c71220220006b20024d044020004100360200200041046b280200417c712202450d0120022d00004101710d01200110362002280200210020012d000041027104402002200041027222003602000b200321012000417c71220020026b41086b20004d0d020b000b02402004417c712202450d004100200220044102711b2202450d0020022d00004101710d0020002002280208417c7136020020022001410172360208200321010c010b200020033602000b41c082c00020013602000b0b4801017f024002402002200241016b2202490d0020012802081a20012802101a20012903001a20012802142203200220036a4b0d00200141003602140c010b000b200041003602000b6701037f230041106b22012400200141086a410b4100100e200128020c210320012802082202418080c000290000370000200241076a418780c000280000360000200041146a41023a00002000420b3702082000200336020420002002360200200141106a24000b6601017f230041106b220324000240200141004e0440027f2002450440200341086a2001100f200328020c210220032802080c010b20032001410110102003280204210220032802000b22010d010b000b2000200136020020002002360204200341106a24000b3301017f230041106b22022400200241086a200141001010200020022802083602002000200228020c360204200241106a24000b4a01017f4101210302402001450440410021010c010b20014101101121030240200204402003450d012003200110380c020b20030d010b410021030b20002001360204200020033602000b9c0101027f230041106b2202240002402000200041046a22034d0440200341016b220020034d0d010b000b20004102762100200241c082c00028020036020c0240200020012002410c6a103522030d0020022000200110344100210320022802000d0020022802042203200228020c3602082002200336020c200020012002410c6a103521030b41c082c000200228020c360200200241106a240020030bd00101037f230041106b22032400024002400240200141004e0440200228020022040d0120032001100f20032802042104200328020021020c020b20004101360200200041086a41003602000c020b20022802042205450440200341086a200141001010200328020c2104200328020821020c010b2001410110112202450440410021020c010b200220042005103720042005100b200121040b2000027f200204402000200236020441000c010b200020013602044101210441010b360200200041086a20043602000b200341106a24000ba70101037f230041206b220224000240200120002802042203200028020822046b4b0440200120046a22012004490d01200320036a22042003490d012004200120012004491b22014108200141084b1b2101024020030440200241186a410136020020022003360214200220002802003602100c010b200241003602100b20022001200241106a101220022802004101460d01200020022902043702000b200241206a24000f0b000b3201017f2000200210132000280208220320002802006a2001200210372003200220036a22014b0440000b200020013602080b4601027f230041106b22032400200341086a20024100100e200328020821042000200328020c36020420002004360200200420012002103720002002360208200341106a24000b14002001200346044020002002200110370f0b000bc60101047f024020000d0020000d00024002402000450d002000450d000c010b410021000b0340024041002000047f20000d0141000541000b22006b22020d022002450d02200041c082c0006a22002c00002203417f4a0d02200020026a220421012002410147044020002d00011a200041026a21010b200341ff017141e001490d0220042200200147047f200141016a210020012d00000541000b1a200341ff017141f001490d022000200447044020002d00001a0b0c020b200041016b21000c000b000b000bec0101067f410121074101210403400240024002402004220620056a22042006490d00200220044d0d01200520086a22092008490d00200220094d0d0002400240200120046a2d00002204200120096a2d000022094b2003710d00200420094f200372450d0020042009460d01200641016a22042006490d024101210741002105200621080c050b200541016a22042005490d01200420066a22042006490d01200420086b220720044b0d010c030b2005200541016a22054b0d002006210420052007470d032004200420076a22044d0d020b000b20002007360204200020083602000f0b410021050c000b000b3701017f230041106b22042400200441086a4100200320012002101a200020042802083602002000200428020c360204200441106a24000b36000240200120024d0440200220044d04402002200220016b2204490d02200020043602042000200120036a3602000f0b000b000b000ba00201077f4101210941012104034002400240024002402004220720056a22042007490d00200120044d0d03200741016a22042007490d00200420056a22082004490d00200120086b220820014b0d00200120084d0d00200a41016a2206200a490d002006200520066a22064b0d00200120066b220620014b0d00200120064d0d0002400240200020086a2d00002208200020066a2d000022064b2003710d00200620084d200372450d0020062008460d0141012109410021052007210a0c040b200541016a22042005490d01200420076a22042007490d012004200a6b220920044b0d010c020b2005200541016a22054b0d0020052009470440200721040c030b200720096a220420074f0d010b000b410021050b20022009470d010b0b200a0b2b01017e034020010440200141016b210142012000310000862002842102200041016a21000c010b0b20020b040041010bbd0402057f017e230041a0016b22002400200041186a100d200041306a4100101f02400240024020002d0030450440200041d0006a2000413c6a29020037030020002000290234370348200041e0006a200041d4006a28020022013602002000200029024c22053703582000200136026c200020053e026820004190016a200041e8006a1020200028029001450d02200041f8006a20004198016a28020022013602002000200029039001220537037020004188016a200136020020002005370380010240200041186a1021450440200041106a2103200041246a220122022802000440000b2002417f360200200320023602042003200241046a36020020002802142102200028021020004198016a200041f8006a280200360200200020002903703703900120004190016a10222002280200220341016a22042003480d0520022004360200200041086a210220012802000440000b2001417f360200200220013602042002200141046a360200200028020c2101200028020822022d00044102470440200241013a00040b2001280200220241016a22032002480d05200120033602000c010b20004180016a100a0b200041186a1023200041d8006a100a0c010b200041c8006a41a982c00041141015200041c8006a1024200041c8006a100a0b200041186a100a2000412c6a2d0000410247044020002802282201280200047f2001100a20002802280520010b410c100b0b200041a0016a24000f0b230041106b220124002001419b82c000410e1015200110242001100a000b000b970201027f230041306b22022400024002401007220341034b0d002001450d0020004181083b01000c010b20022003102b2002280200220310082000027f02402001044020022002280208220136021420022003360210024020014104490d002002410036021c200241106a2002411c6a410410300d00200241206a2002280214102b200241106a2002280220220120022802281030450d02200241206a100a0b200041003a000141010c020b200041003a0000200041046a4100360200200041086a2002290300370200200041106a200241086a2802003602000c020b200228021c21032000410c6a2002290224370200200041086a2001360200200041046a200336020041000b3a00002002100a0b200241306a24000b6202017f017e230041206b22022400200241106a20011026024020022802100440200241086a200241186a2802002201360200200220022903102203370300200041086a2001360200200020033702000c010b200041003602000b200241206a24000b260020001027200041106a22002d00044102460440000b20002802002200410020002802001b0ba00101027f230041106b220324000240024020002d00044102460440410c410410112202450d02200041003a00042000200236020020022001290200370200200241086a200141086a2802003602000c010b200341086a2202200141086a280200360200200320012902003703002000280200220028020004402000100a0b20002003290300370200200041086a20022802003602000b200341106a24000f0b000bdc0301087f230041406a22012400200141286a2000410c6a2203102d200128022c2204280200220541016b220220054e21050240024020012802282d00042206410247044020050d02200420023602002006450d01200141206a210420032802000440000b2003417f360200200420033602042004200341046a36020020012802242104200128022022022d00044102460440000b20022802002202410020022802001b2202044020002802082106200028020041c482c0004100360200200141306a2002102941c482c0002802002200200128023822026a22052000490d032005418080014b0d0320012802302108200141186a20002005102e",
        "2001280218200128021c20082002101641c482c000280200220020026a22022000490d0341c482c0002002360200200141306a100a200141106a41c482c000280200102f20062001280210200128021410040b2004280200220041016a22022000480d0220042002360200200141086a210020032802000440000b2003417f360200200020033602042000200341046a360200200128020c2100200128020822032d00044102470440200341003a00040b2000280200220341016a22042003480d02200020043602000c010b20050d01200420023602000b200141406b24000f0b000b2a01017f230041106b220124002001200010292001280200200128020810062001100a200141106a24000ba00e02087f017e23004180026b22002400200041c8006a100d200041a8016a4101101f0240024002400240024020002d00a8014101470440200041e8006a200041b8016a28020022013602002000200041b0016a290300220837036020002802ac012102200041f8006a200136020020002008370370027f024002400240200241b5a0d2fd79470440200241a9befeeb79460d01200241c6d98aaa03460d02200041f0006a100a200041c8006a1009418b82c0002101411021020c070b20002000280278360284012000200028027036028001200041f0016a20004180016a102620002802f001450d0220004190016a200041f8016a280200360200200020002903f00137038801200041c8006a1027200041dc006a2d00004102460d08200041013a005c200041d8006a2802002202280200450d08200041f8016a20004190016a28020036020020002000290388013703f001200041b5a0d2fd793602a80120004198016a200041a8016a1028200041a8016a200041f0016a102920002802ac01210620002802a801210120004198016a20002802b00122041013200028029801220520002802a00122036a200120041037200320046a22042003490d08200020043602a001200020063602ec01200020013602e801200041e8016a100a2002280200200241086a28020020052004100045044041c482c0004100360200200041086a4100102a0b20004198016a100a200041f0016a100a200041c8006a102341030c030b200041c8006a10212201450d07200041a9befeeb793602a801200041f0016a200041a8016a1028027f41012001280200200128020820002802f00120002802f80110000d001a024010012201418180014f044020004198016a2001102b20002802980122021002200020002802a00136028c012000200236028801200041a8016a20004188016a102620002902ac01210820002802a801210120004198016a100a0c010b4100210220010440102c1002200121020b41c482c0002002360200200041106a2002102a2000200029031037039801200041a8016a20004198016a102620002902ac01210820002802a80121010b2001450b200041f0016a100a0d072001450d072000200837029c012000200136029801200041a8016a20004198016a102920002802a80120002802b0011003200041a8016a100a20004198016a100a41030c020b200020002802783602ec01200020002802703602e801200041f0016a200041e8016a102620002802f001450d0020004190016a200041f8016a22022802002203360200200020002903f00122083703880120022003360200200020083703f0012008a72106027f20030440200041406b2006200341001018200028024420002802402102200041386a2006200341011018200028023c200041306a20062003200220002802382205200220054b22051b2202101920051b220520026a22072005490d082000280234210120002802302104200041286a2005200720062003101a027f20002802282107200028022c200146047f2004200720011039450541000b450440200320026b220120034b0d0a2002200120012002491b220141016a22052001490d0a417f210420062003101c210820022101417f0c010b4100210420032006200320054100101b22012006200320054101101b2207200120074b1b6b220120034b0d09200041206a200620032005101920002802202000280224101c210820030b2107200041e4016a2003360200200041dc016a4100360200200041d0016a2007360200200041cc016a2004360200200041c4016a4200370200200041c0016a2005360200200041bc016a2001360200200041b8016a2002360200200041b0016a2008370300200020063602e001200041c082c0003602d801200041013602a8012008422088a7210120030c010b200041e4016a4100360200200041dc016a4100360200200041b4016a4181023b0100200041b0016a4100360200200020063602e001200041c082c0003602d801200042003703a8014101210141000b2102024020030440200041b0016a2101200041cc016a280200417f47044020004198016a20012002100c0c020b20004198016a20012002100c0c010b20002802ac0122020d08200141ff01710440200041a0016a20023602002000200236029c0120004101360298010c010b20004100360298010b2000280298012102200041f0016a100a200041186a41014100100e200041003602b001200020002903183703a801200020023a009801200041a8016a20004198016a4101101420002802a80120002802b0011003200041a8016a100a41030c010b41010b2104200041f0006a100a200041c8006a1009418b82c0002101411021020240200441016b0e03000204030b419b82c0002101410e21020c020b200041c8006a10090b41a982c0002101411421020b200041a8016a200120021015200041a8016a1024200041a8016a100a0b20004180026a24000f0b000b20021017000b8b0902087f037e230041206b22032400200341003a00080240024002400240027e0240024002402001200341086a410110300d00024020032d0008220241037122044103470440024002400240200441016b0e020201000b200241027621020c030b200320023a000d200341013a000c200320013602082003410036021c200341086a2003411c6a410410310d03200328021c220241ffff034d0d03200241027621020c020b200320023a000d200341013a000c20032001360208200341003b011c200341086a2003411c6a410210310d0220032f011c220241ff014d0d02200241027621020c010b200241044f0d01200341003602082001200341086a410410300d012003280208220241ffffffff034d0d010b20012802042002490d00200341086a2002102b200120032802082204200328021010300440200341086a100a0c010b4100200329020c220c422088a7220541076b2201200120054b1b2109200441036a417c7120046b2108410021010340200120054f0d07024002400240200120046a2d00002206411874411875220741004e04402008417f460d03200820016b4103710d030340200120094f0d03200120046a220241046a280200200228020072418081828478710d032001200141086a22014d0d000b0c010b42808080808020210a428080808010210b024002400240024002402006418b80c0006a2d000041026b0e030002010e0b200141016a22022005490d024200210a0c0c0b4200210a200141016a220220054f0d0b200220046a2d000021020240024002400240200641f0016b0e050100000002000b200241bf014b0d0c2007410f6a41ff017141024b0d0c200241187441187541004e0d0c0c020b200241f0006a41ff017141304f0d0b0c010b2002411874411875417f4a0d0a2002418f014b0d0a0b200141026a220220054f0d0b200220046a2d000041c00171418001470d084200210b200141036a220220054f0d0c200220046a2d000041c00171418001460d02428080808080e0000c0a0b4200210a200141016a220220054f0d0a200220046a2d00002102024002400240200641e001470440200641ed01460d012007411f6a41ff0171410c490d02200241bf014b0d0c200741fe017141ee01470d0c200241187441187541004e0d0c0c030b200241e0017141a001470d0b0c020b2002411874411875417f4a0d0a200241a0014f0d0a0c010b2002411874411875417f4a0d09200241bf014b0d090b4200210b200141026a220220054f0d0b200220046a2d000041c00171418001470d070c010b200220046a2d000041c00171418001470d0a0b200241016a21010c030b000b20012005200120054b1b2102034020012002460440200221010c030b200120046a2c00004100480d02200141016a21010c000b000b200141016a21010c000b000b200041003602000c060b428080808080c0000c010b428080808080200b210a428080808010210b0c010b4200210b0b2001ad200a200b8484210a0b200120054f04402000200c370204200020043602000c010b2003200a3702142003200c37020c20032004360208200341086a100a200041003602000b200341206a24000b900202057f017e230041306b22012400200141106a2000410c6a2202102d024020012802142203280200220441016b220520044e0d0020012802102d00042003200536020041024604400240024020002802002000280208102c10052200450d002000418180014f0d0341c482c0002000360200200141086a2000102a20012001290308370318200141206a200141186a102020012802202200450d00200129022421060c010b410021000b20022802000440000b2002417f360200200120023602042001200241046a3602002001280204210220012802002001200637022420012000360220200141206a10222002280200220041016a22032000480d01200220033602000b200141306a24000f0b000b4801027f230041106b22022400200241086a41044100100e200228020821032000200228020c360204200020033602002003200128000036000020004104360208200241106a24000bb70102037f017e230041106b22032400024002402001280208220241046a220420024f044020012802002101200320044100100e2003290300210520004100360208200020053702002002413f4d04402000200241027410320c030b200241ffff004d0440200320024102744101723b010e20002003410e6a410210140c030b200241ffffffff034b0d012002410274410272200010330c020b000b2000410310322002200010330b2000200120021014200341106a24000b5801027f230041106b22022400200241086a41c482c000280200102f200228020821032001200228020c4b0440000b20022001360204200220033602002000200228020036020020002002280204360204200241106a24000b3602017f017e230041106b22022400200241086a20014101100e200229030821032000200136020820002003370200200241106a24000b2a01027f230041106b22002400200041086a410041c482c000280200102e2000280208200041106a24000b2d01017f200128020041016a220241004c0440000b20012002360200200020013602042000200141046a3602000b3d01017f0240200120024d04402002418080014d04402002200220016b2203490d02200020033602042000200141c882c0006a3602000f0b000b000b000b4b01027f23004110",
        "6b22022400200241086a21032001418080014b0440000b20032001360204200341c882c000360200200020022802083602002000200228020c360204200241106a24000b3901027f2000280204220320024922044504402001200220002802002201200210162000200320026b3602042000200120026a3602000b20040b4201017f20002f01042103200041003a0004200341017145044020002802002001200210300f0b200120034108763a00002000280200200141016a200241016b10300b2601017f230041106b22022400200220013a000f20002002410f6a41011014200241106a24000b2601017f230041106b220224002002200036020c20012002410c6a41041014200241106a24000bd20101017f0240200141ffffffff03712001470d002002200241406b22034b0d00200341ffffffff01712003470d002001410274220120034103742202200120024b1b220241086a22012002490d00027f024020012001418080046a22024d0440200241016b220120024d0d010b000b2001411076220240002201417f4604404100210141010c010b200141ffff03712001470d012002411074220241086b20024b0d012001411074220142003702042001200120026a41027236020041000b210220002001360204200020023602000f0b000baf04010a7f20004102742106410020016b2108200041ffffffff03712000472109200141016b220a20014b210b20022802002100024003402000450d01200021010240034002402001280208220041017145044020090d032001280200417c712203200141086a22056b220420034b0d0320042006490d01200320066b220c20034b0d03200b0d03200541086a22042005490d032004200441406b22044b0d03024020042008200c7122044b04402005200a710d0320022000417c7136020020012001280200410172360200200121000c010b200441086b220020044b0d04200320006b220220034b0d04200241086b20024b0d04200041003602082000420037020020002001280200417c71360200024020012802002202417c712203450d004100200320024102711b2202450d00200220022802044103712000723602040b2000200028020441037120017236020420012001280208417e71360208200120012802002202410371200072220336020002402002410271450440200028020021010c010b20012003417d713602002000200028020041027222013602000b200020014101723602000b200041086a21070c050b20012000417e71360208027f41002001280204417c712200450d001a4100200020002d00004101711b0b21002001103620012d00004102710440200020002802004102723602000b200220003602002000280200417c71220120006b41086b20014b0d02200021010c010b0b200220003602000c010b0b000b20070b7d01027f024020002802002201417c712202450d004100200220014102711b2201450d00200120012802044103712000280204417c71723602040b200020002802042201417c712202047f200220022802004103712000280200417c717236020020002802040520010b410371360204200020002802004103713602000b2801017f034020022003470440200020036a200120036a2d00003a0000200341016a21030c010b0b0b2201017f034020012002470440200020026a41003a0000200241016a21020c010b0b0b3f01027f0340200245044041000f0b200241016b210220012d0000210320002d00002104200041016a2100200141016a210120032004460d000b200420036b0b0b8a020300418080c0000b8b0168656c6c6f5f776f726c6401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010041cd81c0000b3302020202020202020202020202020202020202020202020202020202020203030303030303030303030303030303040404040400418b82c0000b32756e6b6e6f776e2073656c6563746f72696e76616c696420706172616d73636f756c64206e6f74207265616420696e70757400a602046e616d65019e023a000966696d706f72742430010966696d706f72742431020966696d706f72742432030966696d706f72742433040966696d706f72742434050966696d706f72742435060966696d706f72742436070966696d706f72742437080966696d706f727424380901300a01310b01320c01330d01340e01350f0136100137110138120139130231301402313115023132160231331702313518023138190231391a0232301b0232331c0232341d0232351e0232361f023237200232382102323922023331230233322402333325023337260233382702333928023430290234312a0234322b0234332c0234342d0234352e0234372f02343830023439310235303202353233023533340235363502353736023538370235393802363039023631"
    };

    public static final String SM_BINARY = StringUtils.joinAll("", SM_BINARY_ARRAY);

    public static final String[] ABI_ARRAY = {
        "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"address\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"set\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"get\",\"outputs\":[{\"internalType\":\"string\",\"type\":\"string\"}],\"type\":\"function\"}]"
    };

    public static final String ABI = StringUtils.joinAll("", ABI_ARRAY);

    public static final String FUNC_SET = "set";

    public static final String FUNC_GET = "get";

    protected HelloWorld2(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
    }

    public static String getBinary(CryptoSuite cryptoSuite) {
        return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY);
    }

    public static String getABI() {
        return ABI;
    }

    public TransactionReceipt set(String name) {
        final Function function =
                new Function(
                        FUNC_SET,
                        Arrays.<Type>asList(new Utf8String(name)),
                        Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void set(String name, TransactionCallback callback) {
        final Function function =
                new Function(
                        FUNC_SET,
                        Arrays.<Type>asList(new Utf8String(name)),
                        Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForSet(String name) {
        final Function function =
                new Function(
                        FUNC_SET,
                        Arrays.<Type>asList(new Utf8String(name)),
                        Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple1<String> getSetInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function =
                new Function(
                        FUNC_SET,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        List<Type> results =
                this.functionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<String>((String) results.get(0).getValue());
    }

    public String get() throws ContractException {
        final Function function =
                new Function(
                        FUNC_GET,
                        Arrays.<Type>asList(),
                        Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        return executeCallWithSingleValueReturn(function, String.class);
    }

    public static HelloWorld2 load(
            String contractAddress, Client client, CryptoKeyPair credential) {
        return new HelloWorld2(contractAddress, client, credential);
    }

    public static HelloWorld2 deploy(
            Client client, CryptoKeyPair credential, String contractPath, String address)
            throws ContractException {
        byte[] encodedConstructor =
                FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new Utf8String(address)));
        return deploy(
                HelloWorld2.class,
                client,
                credential,
                getBinary(client.getCryptoSuite()),
                getABI(),
                encodedConstructor,
                contractPath);
    }
}
